﻿#ifndef IGBTPROTOCOL_GLOBAL_H
#define IGBTPROTOCOL_GLOBAL_H

#include <QtCore/qglobal.h>
#include <QMap>

#if defined(IGBTPROTOCOL_LIBRARY)
#  define IGBTPROTOCOL_EXPORT Q_DECL_EXPORT
#else
#  define IGBTPROTOCOL_EXPORT Q_DECL_IMPORT
#endif


namespace IGBTProtocol
{
    typedef enum tagFrameHeaderType
    {
        FrameHeader_Cmd = 0x1207,
        FrameHeader_Data = 0x1209,
        FrameHeader_Undef
    }FrameHeaderType;

    typedef enum tagCmdType
    {
        Cmd_SingleOpenCap = 0x6501,
        Cmd_SingleCloseCap = 0x6502,
        Cmd_TimerCap = 0x6504,
        Cmd_FaultCap = 0x6507,
        Cmd_StopCap = 0x65FF,
        Cmd_ExecRes = 0x6001,
        Cmd_Undef
    }CmdType;

    typedef enum tagCmdExecResType
    {
        CmdExecRes_Cplt = 0x55,
        CmdExecRes_Failed = 0xaa,
        CmdExecRes_Running = 0xcc,
        CmdExecRes_Undef
    }CmdExecResType;

    typedef enum tagDataChannelType
    {
        DataChannel_HRate = 0x01,
        DataChannel_LRate = 0x02,
        DataChannel_Undef
    }DataChannelType;

    typedef enum tagDataSourceType
    {
        DataSource_RealTime = 0x01,
        DataSource_SD = 0x02,
        DataSource_Undef
    }DataSourceType;

    typedef enum tagCmdErrCodeType
    {
        CmdErrCode_No_Err = 0,
        CmdErrCode_DAQ_RUNNING = 1
    }CmdErrCodeType;
}

#endif // IGBTPROTOCOL_GLOBAL_H
